/**
 ******************************************************************************
 * @file    BR_PathFollowing.h
 * @author  FSF
 * @date    2019/12/31
 * @brief   路径跟随
 ******************************************************************************
 * @attent
 ******************************************************************************
 */
#ifndef BR_PATH_FOLLOWING_H
#define BR_PATH_FOLLOWING_H

#include "stdint.h"
#include "BR_CenterController.h"

typedef struct {
    float (*pPath)[5];      // 二维数组指针
    float NormalP;          // 法向校正P
    float NormalD;          // 法向校正D
    float ThetaP;           // 自转校正P
    float ThetaD;           // 自转校正D
    float ArriveDistance;   // 判断到达距离[mm]
    float ArriveAngle;      // 判断到达角度[rad] 0.0087266->0.5°
}BR_Path_t;

extern BR_Path_t PathStru1;
void BR_vFollowPath(BR_Path_t pPathStru, float *Vel, float *Dir, float *Omega, BR_MotionMode_t *MotionMode, float *WheelsVel, float *WheelsDir);
void BR_vResetPathFollowing(void);
#endif
